<form class="form_style registed" id="add-new-item" onsubmit="return false;" style="margin: 10px" enctype="multipart/form-data">
	<div class="grid_3" style="width:95%">
		<input type="file" />
		<div class="progress">
        	<div class="bar"></div >
        	<div class="percent">0%</div >
    	</div>

        <div id="status"></div>
		<div class="clear"></div>
   		<input type="submit" value="Upload">
		<div class="clear"></div>
	</div>
	<div class="clear"></div>
</form>
<script>
$(function() {

var bar = $('.bar');
var percent = $('.percent');
var status = $('#status');

$('form').ajaxForm({
    beforeSend: function() {
        status.empty();
        var percentVal = '0%';
        bar.width(percentVal)
        percent.html(percentVal);
    },
    uploadProgress: function(event, position, total, percentComplete) {
        var percentVal = percentComplete + '%';
        bar.width(percentVal)
        percent.html(percentVal);
    },
    complete: function(xhr) {
        status.html(xhr.responseText);
    }
}); 
</script>
